﻿<%@ page language="java" contentType="text/html;  charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="k" uri="http://www.xiaoke.com"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>表单修改页</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="${ctx}/resources/jquery/jquery-1.8.1.min.js"></script>
<link rel="stylesheet" href="${ctx}/resources/bootstrap/css/bootstrap.min.css" type="text/css">
<style type="text/css">
body{margin:10px;}
.table{margin:0px;}
.table th, .table td{padding:1px;white-space:nowrap;}
</style>
<script>
// 关闭窗口
function closeWindow(){
	var win = parent != window ? parent : window;
	win.opener = null;
	win.open('', '_self');
	win.close();
};
// 验证表单
function checkForm(){
	return true;
}
// 保存前验证
function save(){
	var result = checkForm();
	if(result){
		$.getJSON("${ctx}/qx/module/upd", $("#updForm").serialize(), function(res){
			if(res == "1"){
				alert("保存成功！");
				opener.refresh();
				closeWindow();
			}else{
				alert("保存失败！");
			}
		});
	}
}
</script>
</head>
<body>
<form id="updForm" action="">
<table class="table" style="width:100%;margin:0 auto;">
	<thead>
	<tr>
		<td colspan="2">
			<h3 align="center">扣款查询信息</h3>
		</td>
	</tr>
	</thead>
	<tr>
		<td width="100">节点</td><td><input type="text" name="node" value="${module.NODE}" /></td>
	</tr>
	<tr>
		<td>名称</td><td><input type="text" name="name" value="${module.NAME}" /></td>
	</tr>
	<tr>
		<td>URL地址</td><td><input type="text" name="url" value="${module.URL}" /></td>
	</tr>
	<tr>
		<td>父节点</td><td><input type="text" name="pid" value="${module.PID}" /></td>
	</tr>
	<tr>
		<td>排序</td><td><input type="text" name="sort" value="${module.SORT}" /></td>
	</tr>
	<tr>
		<td>是否子节点</td><td><input type="text" name="isLeaf" value="${module.ISLEAF}" /></td>
	</tr>
	<tr>
		<td>是否模块</td><td><input type="text" name="isModule" value="${module.ISMODULE}" /></td>
	</tr>
	<tfoot>
	<tr>
		<td colspan="2" style="text-align:center;">
			<button type="button" class="btn" onclick="closeWindow()">关闭</button>
			<button type="button" class="btn" onclick="save()">保存</button>
		</td>
	</tr>
	</tfoot>
</table>
</form>
</body>
<html>